package java6681.lesson01;


public class Person6681 {
    private String name;

    public Person6681() {
    }

    public Person6681(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    /**
     * 功能：购买一个商品
     * @param mark 要去的超市
     * @param name 要购买的商品名称
     * @return 购买的商品对象
     */

    public Product6681 shopping(Market6681 mark,String name){

        return mark.sell(name);
    }
    /**
     * 功能：购买销售清单中的多个商品
     * @param mark 要去的超市
     * @param products 要购买的商品清单
     * @return 购买的商品对象，多个商品用逗号分割
     */
    public String shopping(Market6681 mark,Product6681[] products){

        return mark.sell(products);
    }


    @Override
    public String toString() {
        return name;
    }
}
